<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>见识DRF的魅力 | 课程介绍</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../C03-Serializer/index.html" />
    
    
    <link rel="prev" href="../C02-DRFProject/InstallAndConfig.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.2"
        data-chapter-title="见识DRF的魅力"
        data-filepath="C02-DRFProject/TheFirstDRFProgram.md"
        data-basepath=".."
        data-revision="Thu May 10 2018 07:57:11 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        课程介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="C01-IntroduceToDRF/index.html">
            
                
                    <a href="../C01-IntroduceToDRF/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        引入DjangoRESTframework
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="C01-IntroduceToDRF/SeparatedFrontendAndBackend.html">
            
                
                    <a href="../C01-IntroduceToDRF/SeparatedFrontendAndBackend.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        Web应用模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="C01-IntroduceToDRF/IntroduceToREST.html">
            
                
                    <a href="../C01-IntroduceToDRF/IntroduceToREST.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        认识RESTful
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="C01-IntroduceToDRF/HowToDesignREST.html">
            
                
                    <a href="../C01-IntroduceToDRF/HowToDesignREST.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        RESTful设计方法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="C01-IntroduceToDRF/DevelopRESTAPIWithDjango.html">
            
                
                    <a href="../C01-IntroduceToDRF/DevelopRESTAPIWithDjango.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        使用Django开发REST接口
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="C01-IntroduceToDRF/CoreTaskToDevelopRESTAPI.html">
            
                
                    <a href="../C01-IntroduceToDRF/CoreTaskToDevelopRESTAPI.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        明确REST接口开发的核心任务
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="C01-IntroduceToDRF/AboutDRF.html">
            
                
                    <a href="../C01-IntroduceToDRF/AboutDRF.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        DjangoRESTframework简介
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="C02-DRFProject/index.html">
            
                
                    <a href="../C02-DRFProject/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        DRF工程搭建
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="C02-DRFProject/InstallAndConfig.html">
            
                
                    <a href="../C02-DRFProject/InstallAndConfig.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        环境安装与配置
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.2" data-path="C02-DRFProject/TheFirstDRFProgram.html">
            
                
                    <a href="../C02-DRFProject/TheFirstDRFProgram.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        见识DRF的魅力
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="C03-Serializer/index.html">
            
                
                    <a href="../C03-Serializer/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        Serializer序列化器
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="C03-Serializer/Declaring.html">
            
                
                    <a href="../C03-Serializer/Declaring.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        定义Serializer
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="C03-Serializer/Serializing.html">
            
                
                    <a href="../C03-Serializer/Serializing.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        序列化使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="C03-Serializer/Deserializing.html">
            
                
                    <a href="../C03-Serializer/Deserializing.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        反序列化使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="C03-Serializer/ModelSerializer.html">
            
                
                    <a href="../C03-Serializer/ModelSerializer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        模型类序列化器ModelSerializer
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="C04-View/index.html">
            
                
                    <a href="../C04-View/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        视图
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="C04-View/RequestAndResponse.html">
            
                
                    <a href="../C04-View/RequestAndResponse.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        Request与Response
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="C04-View/View.html">
            
                
                    <a href="../C04-View/View.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        视图概览
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="C04-View/ViewIntroduction.html">
            
                
                    <a href="../C04-View/ViewIntroduction.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        视图说明
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="C04-View/ViewSet.html">
            
                
                    <a href="../C04-View/ViewSet.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        视图集ViewSet
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="C04-View/Routers.html">
            
                
                    <a href="../C04-View/Routers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        路由Router
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="C05-Components/index.html">
            
                
                    <a href="../C05-Components/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        其他功能
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="C05-Components/Authentication.html">
            
                
                    <a href="../C05-Components/Authentication.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        认证
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="C05-Components/Permissions.html">
            
                
                    <a href="../C05-Components/Permissions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        权限
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="C05-Components/Throttling.html">
            
                
                    <a href="../C05-Components/Throttling.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        限流
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="C05-Components/Filtering.html">
            
                
                    <a href="../C05-Components/Filtering.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        过滤
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="C05-Components/Pagination.html">
            
                
                    <a href="../C05-Components/Pagination.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        分页
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="C05-Components/Versioning.html">
            
                
                    <a href="../C05-Components/Versioning.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        版本
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="C05-Components/Exceptions.html">
            
                
                    <a href="../C05-Components/Exceptions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.7.</b>
                        
                        异常处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.8" data-path="C05-Components/Documents.html">
            
                
                    <a href="../C05-Components/Documents.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.8.</b>
                        
                        自动生成接口文档
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >课程介绍</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x89C1;&#x8BC6;drf&#x7684;&#x9B45;&#x529B;">&#x89C1;&#x8BC6;DRF&#x7684;&#x9B45;&#x529B;</h1>
<p>&#x6211;&#x4EEC;&#x4ECD;&#x4EE5;&#x5728;&#x5B66;&#x4E60;Django&#x6846;&#x67B6;&#x65F6;&#x4F7F;&#x7528;&#x7684;&#x56FE;&#x4E66;&#x82F1;&#x96C4;&#x4E3A;&#x6848;&#x4F8B;&#xFF0C;&#x4F7F;&#x7528;Django REST framework&#x5FEB;&#x901F;&#x5B9E;&#x73B0;&#x56FE;&#x4E66;&#x7684;REST API&#x3002;</p>
<h2 id="1--&#x521B;&#x5EFA;&#x5E8F;&#x5217;&#x5316;&#x5668;">1.  &#x521B;&#x5EFA;&#x5E8F;&#x5217;&#x5316;&#x5668;</h2>
<p>&#x5728;booktest&#x5E94;&#x7528;&#x4E2D;&#x65B0;&#x5EFA;serializers.py&#x7528;&#x4E8E;&#x4FDD;&#x5B58;&#x8BE5;&#x5E94;&#x7528;&#x7684;&#x5E8F;&#x5217;&#x5316;&#x5668;&#x3002;</p>
<p>&#x521B;&#x5EFA;&#x4E00;&#x4E2A;BookInfoSerializer&#x7528;&#x4E8E;&#x5E8F;&#x5217;&#x5316;&#x4E0E;&#x53CD;&#x5E8F;&#x5217;&#x5316;&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookInfoSerializer</span><span class="hljs-params">(serializers.ModelSerializer)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;&#x56FE;&#x4E66;&#x6570;&#x636E;&#x5E8F;&#x5217;&#x5316;&#x5668;&quot;&quot;&quot;</span>
    <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Meta</span>:</span>
        model = BookInfo
        fields = <span class="hljs-string">&apos;__all__&apos;</span>
</code></pre>
<ul>
<li><strong>model</strong> &#x6307;&#x660E;&#x8BE5;&#x5E8F;&#x5217;&#x5316;&#x5668;&#x5904;&#x7406;&#x7684;&#x6570;&#x636E;&#x5B57;&#x6BB5;&#x4ECE;&#x6A21;&#x578B;&#x7C7B;BookInfo&#x53C2;&#x8003;&#x751F;&#x6210;</li>
<li><strong>fields</strong> &#x6307;&#x660E;&#x8BE5;&#x5E8F;&#x5217;&#x5316;&#x5668;&#x5305;&#x542B;&#x6A21;&#x578B;&#x7C7B;&#x4E2D;&#x7684;&#x54EA;&#x4E9B;&#x5B57;&#x6BB5;&#xFF0C;&apos;__all__&apos;&#x6307;&#x660E;&#x5305;&#x542B;&#x6240;&#x6709;&#x5B57;&#x6BB5;</li>
</ul>
<h2 id="2--&#x7F16;&#x5199;&#x89C6;&#x56FE;">2.  &#x7F16;&#x5199;&#x89C6;&#x56FE;</h2>
<p>&#x5728;booktest&#x5E94;&#x7528;&#x7684;views.py&#x4E2D;&#x521B;&#x5EFA;&#x89C6;&#x56FE;BookInfoViewSet&#xFF0C;&#x8FD9;&#x662F;&#x4E00;&#x4E2A;&#x89C6;&#x56FE;&#x96C6;&#x5408;&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> rest_framework.viewsets <span class="hljs-keyword">import</span> ModelViewSet
<span class="hljs-keyword">from</span> .serializers <span class="hljs-keyword">import</span> BookInfoSerializer
<span class="hljs-keyword">from</span> .models <span class="hljs-keyword">import</span> BookInfo

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">BookInfoViewSet</span><span class="hljs-params">(ModelViewSet)</span>:</span>
    queryset = BookInfo.objects.all()
    serializer_class = BookInfoSerializer
</code></pre>
<ul>
<li><strong>queryset</strong> &#x6307;&#x660E;&#x8BE5;&#x89C6;&#x56FE;&#x96C6;&#x5728;&#x67E5;&#x8BE2;&#x6570;&#x636E;&#x65F6;&#x4F7F;&#x7528;&#x7684;&#x67E5;&#x8BE2;&#x96C6;</li>
<li><strong>serializer_class</strong> &#x6307;&#x660E;&#x8BE5;&#x89C6;&#x56FE;&#x5728;&#x8FDB;&#x884C;&#x5E8F;&#x5217;&#x5316;&#x6216;&#x53CD;&#x5E8F;&#x5217;&#x5316;&#x65F6;&#x4F7F;&#x7528;&#x7684;&#x5E8F;&#x5217;&#x5316;&#x5668;</li>
</ul>
<h2 id="3--&#x5B9A;&#x4E49;&#x8DEF;&#x7531;">3.  &#x5B9A;&#x4E49;&#x8DEF;&#x7531;</h2>
<p>&#x5728;booktest&#x5E94;&#x7528;&#x7684;urls.py&#x4E2D;&#x5B9A;&#x4E49;&#x8DEF;&#x7531;&#x4FE1;&#x606F;&#x3002;</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> . <span class="hljs-keyword">import</span> views
<span class="hljs-keyword">from</span> rest_framework.routers <span class="hljs-keyword">import</span> DefaultRouter

urlpatterns = [
    ...
]

router = DefaultRouter()  <span class="hljs-comment"># &#x53EF;&#x4EE5;&#x5904;&#x7406;&#x89C6;&#x56FE;&#x7684;&#x8DEF;&#x7531;&#x5668;</span>
router.register(<span class="hljs-string">r&apos;books&apos;</span>, views.BookInfoViewSet)  <span class="hljs-comment"># &#x5411;&#x8DEF;&#x7531;&#x5668;&#x4E2D;&#x6CE8;&#x518C;&#x89C6;&#x56FE;&#x96C6;</span>

urlpatterns += router.urls  <span class="hljs-comment"># &#x5C06;&#x8DEF;&#x7531;&#x5668;&#x4E2D;&#x7684;&#x6240;&#x4EE5;&#x8DEF;&#x7531;&#x4FE1;&#x606F;&#x8FFD;&#x5230;&#x5230;django&#x7684;&#x8DEF;&#x7531;&#x5217;&#x8868;&#x4E2D;</span>
</code></pre>
<h2 id="4---&#x8FD0;&#x884C;&#x6D4B;&#x8BD5;">4.   &#x8FD0;&#x884C;&#x6D4B;&#x8BD5;</h2>
<p>&#x8FD0;&#x884C;&#x5F53;&#x524D;&#x7A0B;&#x5E8F;&#xFF08;&#x4E0E;&#x8FD0;&#x884C;Django&#x4E00;&#x6837;&#xFF09;</p>
<pre><code class="lang-shell">python manage.py runserver
</code></pre>
<p>&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x8F93;&#x5165;&#x7F51;&#x5740;127.0.0.1:8000&#xFF0C;&#x53EF;&#x4EE5;&#x770B;&#x5230;DRF&#x63D0;&#x4F9B;&#x7684;API Web&#x6D4F;&#x89C8;&#x9875;&#x9762;&#xFF1A;</p>
<p><img src="../images/&#x56FE;&#x4E66;&#x63A5;&#x53E3;Web&#x6D4F;&#x89C8;&#x9875;&#x9762;.png" alt="&#x56FE;&#x4E66;&#x63A5;&#x53E3;Web&#x6D4F;&#x89C8;&#x9875;&#x9762;"></p>
<p>1&#xFF09;&#x70B9;&#x51FB;&#x94FE;&#x63A5;127.0.0.1:8000/books/ &#x53EF;&#x4EE5;&#x8BBF;&#x95EE;<strong>&#x83B7;&#x53D6;&#x6240;&#x6709;&#x6570;&#x636E;&#x7684;&#x63A5;&#x53E3;</strong>&#xFF0C;&#x5448;&#x73B0;&#x5982;&#x4E0B;&#x9875;&#x9762;&#xFF1A;</p>
<p><img src="../images/&#x67E5;&#x8BE2;&#x6240;&#x6709;&#x56FE;&#x4E66;&#x4FE1;&#x606F;1.png" alt="&#x67E5;&#x8BE2;&#x6240;&#x6709;&#x56FE;&#x4E66;&#x4FE1;&#x606F;1"></p>
<p><img src="../images/&#x67E5;&#x8BE2;&#x6240;&#x6709;&#x56FE;&#x4E66;&#x9875;&#x9762;2.png" alt="&#x67E5;&#x8BE2;&#x6240;&#x6709;&#x56FE;&#x4E66;&#x4FE1;&#x606F;2"></p>
<p>2&#xFF09;&#x5728;&#x9875;&#x9762;&#x5E95;&#x4E0B;&#x8868;&#x5355;&#x90E8;&#x5206;&#x586B;&#x5199;&#x56FE;&#x4E66;&#x4FE1;&#x606F;&#xFF0C;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;<strong>&#x6DFB;&#x52A0;&#x65B0;&#x56FE;&#x4E66;&#x7684;&#x63A5;&#x53E3;</strong>&#xFF0C;&#x4FDD;&#x5B58;&#x65B0;&#x4E66;&#xFF1A;</p>
<p><img src="../images/&#x4FDD;&#x5B58;&#x65B0;&#x56FE;&#x4E66;&#x4FE1;&#x606F;.png" alt="&#x4FDD;&#x5B58;&#x65B0;&#x56FE;&#x4E66;"></p>
<p>&#x70B9;&#x51FB;POST&#x540E;&#xFF0C;&#x8FD4;&#x56DE;&#x5982;&#x4E0B;&#x9875;&#x9762;&#x4FE1;&#x606F;&#xFF1A;</p>
<p><img src="../images/&#x4FDD;&#x5B58;&#x56FE;&#x4E66;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;.png" alt="&#x4FDD;&#x5B58;&#x56FE;&#x4E66;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;"></p>
<p>3&#xFF09;&#x5728;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x8F93;&#x5165;&#x7F51;&#x5740;127.0.0.1:8000/books/1/&#xFF0C;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;<strong>&#x83B7;&#x53D6;&#x5355;&#x4E00;&#x56FE;&#x4E66;&#x4FE1;&#x606F;&#x7684;&#x63A5;&#x53E3;</strong>&#xFF08;id&#x4E3A;1&#x7684;&#x56FE;&#x4E66;&#xFF09;&#xFF0C;&#x5448;&#x73B0;&#x5982;&#x4E0B;&#x9875;&#x9762;&#xFF1A;</p>
<p><img src="../images/&#x83B7;&#x53D6;&#x5355;&#x4E00;&#x56FE;&#x4E66;&#x4FE1;&#x606F;.png" alt="&#x83B7;&#x53D6;&#x5355;&#x4E00;&#x56FE;&#x4E66;&#x4FE1;&#x606F;"></p>
<p>4&#xFF09;&#x5728;&#x9875;&#x9762;&#x5E95;&#x90E8;&#x8868;&#x5355;&#x4E2D;&#x586B;&#x5199;&#x56FE;&#x4E66;&#x4FE1;&#x606F;&#xFF0C;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;<strong>&#x4FEE;&#x6539;&#x56FE;&#x4E66;&#x7684;&#x63A5;&#x53E3;</strong>&#xFF1A;</p>
<p><img src="../images/&#x4FEE;&#x6539;&#x56FE;&#x4E66;&#x4FE1;&#x606F;.png" alt="&#x4FEE;&#x6539;&#x56FE;&#x4E66;&#x4FE1;&#x606F;"></p>
<p>&#x70B9;&#x51FB;PUT&#xFF0C;&#x8FD4;&#x56DE;&#x5982;&#x4E0B;&#x9875;&#x9762;&#x4FE1;&#x606F;&#xFF1A;</p>
<p><img src="../images/&#x4FEE;&#x6539;&#x56FE;&#x4E66;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;.png" alt="&#x4FEE;&#x6539;&#x56FE;&#x4E66;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;"></p>
<p>5&#xFF09;&#x70B9;&#x51FB;DELETE&#x6309;&#x94AE;&#xFF0C;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;<strong>&#x5220;&#x9664;&#x56FE;&#x4E66;&#x7684;&#x63A5;&#x53E3;</strong>&#xFF1A;</p>
<p><img src="../images/&#x5220;&#x9664;&#x56FE;&#x4E66;.png" alt="&#x5220;&#x9664;&#x56FE;&#x4E66;"></p>
<p>&#x8FD4;&#x56DE;&#xFF0C;&#x5982;&#x4E0B;&#x9875;&#x9762;&#xFF1A;</p>
<p><img src="../images/&#x5220;&#x9664;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;.png" alt="&#x5220;&#x9664;&#x56FE;&#x4E66;&#x8FD4;&#x56DE;&#x4FE1;&#x606F;"></p>
<p>&#x81F3;&#x6B64;&#xFF0C;&#x662F;&#x4E0D;&#x662F;&#x53D1;&#x73B0;Django REST framework&#x5F88;&#x597D;&#x7528;&#xFF01;</p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../C02-DRFProject/InstallAndConfig.html" class="navigation navigation-prev " aria-label="Previous page: 环境安装与配置"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../C03-Serializer/index.html" class="navigation navigation-next " aria-label="Next page: Serializer序列化器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
